<!DOCTYPE html>
<html>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
    <meta charset="utf-8">
    
    <title>Product view</title>
</head>
<body>
{:widget('Cate/header')}
    <div class="breadcrumbs">
        <div class="container_12">
            <div class="grid_12">
                 <a href="index.html">Home</a><span></span><a href="#">Category</a><span></span><span class="current">This page</span>
            </div><!-- .grid_12 -->
        </div><!-- .container_12 -->
    </div><!-- .breadcrumbs -->
    
    <section id="main">
        <div class="container_12">
            <div id="content" class="grid_12" style="margin-top: -20px;">
                <article class="product_page">
                    <div class="grid_5 img_slid" id="products">
			<img class="sale" src="/static/home/img/sale.png" alt="Sale">
			<div class="preview slides_container">
			    <div class="prev_bg">
				<a href="{$detail_datas['goods_pic']}" class="jqzoom" rel='gal1' title="">
				    <img src="{$detail_datas['goods_pic']}" alt="Product 1" title="">
				</a>
			    </div>
			</div>

			<div id="pagination"></div>
		    </div><!-- .grid_5 -->
                    
                    <div class="grid_7">
			<div class="entry_content">
                            <div class="soc">
				<!--<img src="/static/home/img/soc.png" alt="Soc">-->
			    </div><!-- .soc -->
                            
			    <p style="font-size: 24px;">{$detail_datas['goods_name']}</p>
                            <div class="ava_price">
                                <div>
                                    <!--<div class="price_old">$1,725.00</div>-->
                                    <span style="font-size: 18px;">商品价格:</span>
                                    <span style="font-size: 24px; color: #A60000">${$detail_datas['goods_price']}</span>
				</div><!-- .price -->
                                
				<div class="availability_sku" style="margin-top: 30px;">
				    <div class="availability">
                        <a style="font-size: 18px; color:#666; text-decoration:none">商品描述:</a>
                        <span>{$detail_datas['goods_overview']}</span>
				    </div>

                    <div class="sku" style="margin-top: 30px;">
                        <div style="width:100px;height:50px; float:left; padding-top:15px;">
                            <a style="font-size: 18px; color:#666; text-decoration:none;">商品品牌:</a>
                        </div>
                        <div style="height:50px; float:left;">
                            <img src="{$brand_datas['brand_pic']}"/>
                        </div>
                        <div style="clear:both;">
                        </div>
                    </div>

				    <div class="sku" style="margin-top: 30px;">
                     <a style="font-size: 18px; color:#666; text-decoration:none">商品型号:</a>
                        {foreach $model as $val}
                        <input type="radio" name="model_id" value="{$val.mid}"/><span style="font-size: 18px;">{$val.model}</span>
                        {/foreach}
					 <span></span>
				    </div>
				</div><!-- .availability_sku -->
                                <div class="clear"></div>
			    </div><!-- .ava_price -->
			    <div class="cart">
                    <a href="javascript:;" class="bay" id="cart" onclick="to_cart('/cart/add/id/{$mode_datas.id}/model/')">
                        <img src="/static/home/img/bg_cart.png" alt="Buy" title="添加到购物车">添加至购物车
                    </a>
                                <a href="#" class="like"><img src="/static/home/img/like.png" alt="" title=""> Add to Compare</a>
                                <a href="#" class="obn"><img src="/static/home/img/obl.png" alt="" title="">Add to Compare</a>
                            </div><!-- .cart -->

			</div><!-- .entry_content -->
		    </div><!-- .grid_7 -->
		    <div class="clear"></div>
                    
                    <div class="grid_12" >
			<div id="wrapper_tab" class="tab1">
			    <a href="#" class="tab1 tab_link">商品展示</a>
			    <a href="#" class="tab2 tab_link">商品评论</a>

			    <div class="clear"></div>

			    <div class="tab1 tab_body">
                    {$detail_datas['goods_introduce']}
			    </div>

			    <div class="tab2 tab_body">
				<h4>买家评论</h4>
                  <ul class="comments">
                      {if !empty($comment_datas)}
                      {foreach $comment_datas as $v}
				    <li>
					<div class="autor">{$v['user_name']}</div>, <time datetime="2012-11-03">{$v['create_time']}</time>

					<p style="margin-top: 20px;">{$v['contents']}</p>
                    </li>
                    {/foreach}
                    {else}
                      <li>该商品还没有任何买家进行评论</li>
                    {/if}

				</ul><!-- .comments -->
                <div class="clear"></div>
			    </div><!-- .tab2 .tab_body -->

			    <div class="tab3 tab_body">
				<h4>Custom Tab</h4>
				<div class="clear"></div>
			    </div><!-- .tab3 .tab_body -->
			    <div class="clear"></div>
			</div>​<!-- #wrapper_tab -->
			<div class="clear"></div>
		    </div><!-- .grid_12 -->
                    
		</article><!-- .product_page -->
                    
                <div class="clear"></div>
            </div><!-- #content -->

            <div class="clear"></div>
        </div><!-- .container_12 -->
    </section><!-- #main -->
    <div class="clear"></div>
{:widget('Cate/footer')}
</body>
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<script>

    layui.use(['layer'], function() {
        var layer = layui.layer;
    })

    function to_cart(url){
        //首先把选取的型号存入model
        var model=$('input[name="model_id"]:checked').val();
        $.get(url,{model:model},function (data) {
            if(data.status==0){
                layer.msg(data.msg,{icon:1,time:1000})
            }else if(data.status==3){
                layer.msg(data.msg, {icon: 2,time:1000},function () {
                    location.href='/home/login/index';
                });
            }else{
                layer.msg(data.msg, {icon: 2,time:1000});
            }
        },'json')
    }
</script>
</html>
